package currency;

class BaseLine extends Accumulator {
    {
        mId = "BaseLine";
    }

    @Override
    public void accumulate() {
        try {
            mValue += sPreLoaded[mIndex++];
            if(mIndex >= SIZE) {
                mIndex = 0;
            }
        } catch (ArrayIndexOutOfBoundsException e) {
            // System.out.println("BaseLine.accumulate error: " + e.toString());
        }
    }

    @Override
    public long read() {
        return mValue;
    }
}
